<div class="container">
  <h1>Home</h1>

  <div ng-show="!user" class="row">
    <div class="col-md-12">
      <h2>Signup or login to ngroad</h2>
      <div google-signin 
        client-id='395118764200' 
        after-signin="signedIn(oauth)"></div>
    </div>
  </div>

  <div ng-show="user">
    <pre>{{ user | json }}</pre>
    <div class="row"
      <div class="col-md-12">
        <div file-upload="onFile(files)"></div>
      </div>
      
      <div ng-show="images">
        <div class="col-sm-6 col-md-4" 
          ng-repeat="image in images">
          <div class="thumbnail">
            <img ng-click="sellImage(image)"
                data-ng-src="{{image.itemUrl}}" />
          </div>
        </div>
      </div>

      <div ng-show="showCC">
        <form ng-submit="submitPayment()">
          <span ng-bind="errors"></span>

          <label>
            <span>Card Number</span>
            <input type="text" 
                    ng-minlength="16"
                    ng-maxlength="20"
                    size="20"
                    data-stripe="number"
                    ng-model="charge.number" />
          </label>

          <label>
            <span>CVC</span>
            <input type="text" 
                    ng-minlength="3" 
                    ng-maxlength="4" 
                    data-stripe="cvc"
                    ng-model="charge.cvc" />
          </label>

          <label>
            <span>Expiration (MM/YYYY)</span>
            <input type="text" 
              ng-minlength="2" 
              ng-maxlength="2" 
              size="2" 
              data-stripe="exp_month"
              ng-model="charge.exp_month" />
          </label>
          <span> / </span>
          <input type="text" 
            ng-minlength="4" 
            ng-maxlength="4" 
            size="4" 
            data-stripe="exp-year"
            ng-model="charge.exp_year" />

          <input type="hidden"
            name="email"
            value="user.email" />

          <button type="submit">Submit Payment</button>
        </form>
      </div>

      <div ng-show="!images">
        <h4>You have nothing for sale. Upload something</h4>
      </div>

    </div>
  </div>  
</div>
